Optimal. Leaf size=86 \[ -\frac {(a+b x)^{-2+n} (c+d x)^{1-n}}{(b c-a d) (2-n)}+\frac {d (a+b x)^{-1+n} (c+d x)^{1-n}}{(b c-a d)^2 (1-n) (2-n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {47, 37}
\begin {gather*} \frac {d (a+b x)^{n-1} (c+d x)^{1-n}}{(1-n) (2-n) (b c-a d)^2}-\frac {(a+b x)^{n-2} (c+d x)^{1-n}}{(2-n) (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 47
Rubi steps
\begin {align*} \int (a+b x)^{-3+n} (c+d x)^{-n} \, dx &=-\frac {(a+b x)^{-2+n} (c+d x)^{1-n}}{(b c-a d) (2-n)}-\frac {d \int (a+b x)^{-2+n} (c+d x)^{-n} \, dx}{(b c-a d) (2-n)}\\ &=-\frac {(a+b x)^{-2+n} (c+d x)^{1-n}}{(b c-a d) (2-n)}+\frac {d (a+b x)^{-1+n} (c+d x)^{1-n}}{(b c-a d)^2 (1-n) (2-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 59, normalized size = 0.69 \begin {gather*} \frac {(a+b x)^{-2+n} (c+d x)^{1-n} (-a d (-2+n)+b c (-1+n)+b d x)}{(b c-a d)^2 (-2+n) (-1+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-1)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.19, size = 127, normalized size = 1.48
method | result | size |
gosper | \(-\frac {\left (b x +a \right )^{-2+n} \left (d x +c \right ) \left (a d n -b c n -b d x -2 a d +b c \right ) \left (d x +c \right )^{-n}}{a^{2} d^{2} n^{2}-2 a b c d \,n^{2}+b^{2} c^{2} n^{2}-3 a^{2} d^{2} n +6 a b c d n -3 b^{2} c^{2} n +2 a^{2} d^{2}-4 a b c d +2 b^{2} c^{2}}\) | \(127\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 206 vs.
\(2 (79) = 158\).
time = 0.33, size = 206, normalized size = 2.40 \begin {gather*} \frac {{\left (b^{2} d^{2} x^{3} - a b c^{2} + 2 \, a^{2} c d + {\left (3 \, a b d^{2} + {\left (b^{2} c d - a b d^{2}\right )} n\right )} x^{2} + {\left (a b c^{2} - a^{2} c d\right )} n - {\left (b^{2} c^{2} - 2 \, a b c d - 2 \, a^{2} d^{2} - {\left (b^{2} c^{2} - a^{2} d^{2}\right )} n\right )} x\right )} {\left (b x + a\right )}^{n - 3}}{{\left (2 \, b^{2} c^{2} - 4 \, a b c d + 2 \, a^{2} d^{2} + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} n^{2} - 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} n\right )} {\left (d x + c\right )}^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] N/A
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.77, size = 220, normalized size = 2.56 \begin {gather*} {\left (a+b\,x\right )}^{n-3}\,\left (\frac {x\,\left (2\,a^2\,d^2-b^2\,c^2-a^2\,d^2\,n+b^2\,c^2\,n+2\,a\,b\,c\,d\right )}{{\left (a\,d-b\,c\right )}^2\,{\left (c+d\,x\right )}^n\,\left (n^2-3\,n+2\right )}+\frac {b^2\,d^2\,x^3}{{\left (a\,d-b\,c\right )}^2\,{\left (c+d\,x\right )}^n\,\left (n^2-3\,n+2\right )}+\frac {a\,c\,\left (2\,a\,d-b\,c-a\,d\,n+b\,c\,n\right )}{{\left (a\,d-b\,c\right )}^2\,{\left (c+d\,x\right )}^n\,\left (n^2-3\,n+2\right )}+\frac {b\,d\,x^2\,\left (3\,a\,d-a\,d\,n+b\,c\,n\right )}{{\left (a\,d-b\,c\right )}^2\,{\left (c+d\,x\right )}^n\,\left (n^2-3\,n+2\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________